<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
    <meta http-equiv="X-UA-Compatible" content="ie=edge,chrome=1">
    <meta name="author" content="胡爱静">
    <title>千图网</title>
    <style>
        * {
            box-sizing: border-box;
        }

        body {
            margin: 0;
        }

        ul {
            padding: 0;
            margin: 0;
            list-style: none;
        }

        nav {
            width: 100%;
            height: 50px;
            line-height: 50px;
            background-color: #10C55B;
        }

        .container {
            margin: 0 auto;
            width: 1200px;
        }

        #r5c4 {
            width: 22px;
            height: 16px;
            background: url('common.png') -156px -386px no-repeat;
            background-position-x: -126px;
            display: block;
            float: left;
            margin-top: 18px;
        }

        .nav-top {
            color: white;
            display: flex;
            justify-content: space-between;
        }

        .nav-left,
        .nav-right {
            display: flex;
        }

        .nav-left li,
        .nav-right #r1 {
            font-size: 16px;
            padding: 0 10px;
            cursor: pointer;
        }

        #right1 {
            margin-left: 10px;
        }

        .nav-left .shouye {
            background-color: #01AC48;
        }

        .nav-left li:hover,
        .nav-right #r1:hover {
            background-color: #01AC48;
        }

        #rignt2 {
            text-align: center;
            width: 60px;
            height: 30px;
            font-size: 14px;
            line-height: 30px;
            border-radius: 5px;
            background-color: #01923D;
            margin: 10px;
            cursor: pointer;
        }

        #rignt2:hover {
            box-shadow: 0 0 0 3px #01AC48;
        }

        .nav-right #rignt3 {
            font-size: 14px;
            color: #01923D;
            margin: 0 10px;
            cursor: pointer;
        }

        header {
            margin-top: 40px;
        }

        .header-left {
            width: 140px;
            height: 80px;
            float: left;
        }

        .kuang {
            margin-top: 10px;
            width: 650px;
            height: 55px;
            margin-left: 255px;
            border-radius: 5px;
            border: 1px solid lightgray;
            position: relative;
        }

        .quanzhan {
            display: inline-block;
            margin-top: 10px;
            width: 60px;
            height: 30px;
            padding-left: 5px;
            line-height: 40px;
            border-right: 1px solid lightgray;
        }

        input {
            height: 40px;
            width: 550px;
            border: none;
            outline: medium;
        }

        .search {
            background: url(common.png) -66px -446px no-repeat;
            width: 20px;
            height: 20px;
            display: inline-block;
        }

        .search-b {
            width: 80px;
            text-align: center;
            line-height: 50px;
            height: 53px;
            position: absolute;
            display: inline-block;
            background-color: #17e66c;
            border-radius: 0 5px 5px 0;
        }

        .header-bottom {
            font-size: 14px;
            margin-left: 255px;
            margin-top: 10px;
        }

        .hot-search {
            text-decoration: none;
        }

        .header-bottom span {
            padding-right: 10px;
        }

        .black {
            color: black;
        }

        .green {
            color: #17e66c;
        }

        .hot-search .black:hover {
            color: #17e66c;
        }

        .img {
            width: 100%;
            height: 320px;
            margin-top: 50px;
            background-color: black;
        }

        .imgs {
            position: relative;
        }

        .img-list li {
            position: absolute;
            top: 0;
            left: 0;
            display: none;
        }

        .img-list li.current {
            display: block;
        }

        .indicator a {
            width: 100%;
            height: 30px;
            position: absolute;
            left: 0;
            top: 270px;
            margin: 0 auto;
            opacity: 0.7;
            display: flex;
            justify-content: center;
            border-radius: 10px;
            text-decoration: none;
        }

        .indicator li {
            width: 20px;
            height: 20px;
            text-align: center;
            background-color: white;
            border-radius: 50%;
            margin: 5px;
        }

        .indicator li:hover {
            background-color: red;
        }

        .indicator .active {
            background-color: red;
        }

        .img-click {
            width: 100%;
            height: 100%;
            position: relative;
        }

        .img-click span {
            position: absolute;
            width: 30px;
            height: 80px;

            top: calc(50% - 40px);
            text-align: center;
            line-height: 80px;
            font-size: 30px;
            color: white;
            background-color: #38f;
            opacity: 0.7;
            display: none;
        }

        .img-click .prev {
            left: 0;
            border-radius: 0 15px 15px 0;
        }

        .img-click .next {
            right: 0;
            border-radius: 15px 0 0 15px;
        }

        .jxwz {
            width: 100%;
            height: 50px;
            margin-top: 40px;
        }

        .jx-all li,
        .haibao-tu li {
            cursor: pointer;
            overflow: hidden;
        }

        .jxwz .jingtu,
        .jxwz .haibao {
            width: 30px;
            height: 30px;
            display: inline-block;
            vertical-align: bottom;
        }

        .jxwz .jingtu {
            background: url(common.png) -96px -415px no-repeat;
        }

        .haibao {
            background: url(common.png) -126px -415px no-repeat;
        }

        .jxwz .zhuanqu {
            font-size: 25px;
            color: #666;
        }

        .xiao a,
        .haibao-tu a {
            text-decoration: none;
            color: #999;
            font-size: 14px;
        }

        .xiao {
            margin-top: 5px;
            float: right;
            width: 1020px;
            display: flex;
            justify-content: space-between;
        }

        .xiao span {
            padding-right: 20px;
        }

        .jx-all ul,
        .haibao-tu ul {
            display: flex;
            justify-content: space-between;
        }

        .jx-all li,
        .haibao-tu li {
            position: relative;
        }

        .yin,
        .yin2 {
            width: 100%;
            height: 100%;
            background-color: rgba(0, 0, 0, 0.5);
            position: absolute;
            top: 0;
            left: 0;
            opacity: 0;
            transition: all 0.3s;
        }
        .jx-all ul li:hover .yin,
        .haibao-tu ul li:hover .yin2{
            opacity: 1;
        }

        .jx-all ul .jxtu .jxzi {
            width: 60%;
           border-top: 1px solid white;
           border-bottom: 1px solid white;
            position: absolute;
            text-align: center;
            top: 100%;
            left: 20%;
        }

       .jx-all ul li:hover .jxzi{
            top: 30%;
            color: white;
         transition: all 0.3s;
        }

        .yuanchuang,
        .xiazai,
        .dingyue {
            width: 53px;
            height: 53px;
            position: absolute;
            top: 0;
        }

        .yuanchuang {
            background: url(common.png) 0 0 no-repeat;
            left: 0;
        }
        .haibao-tu ul li{
            height: 430px;
            width: 290px;
        }
        .haibao-tu ul li .xiazai-all {
          position: absolute;
          right: 20px;
          top: -80px;
        }

        .haibao-tu li:hover .xiazai-all{
              top: 20px;
              transition: all 0.3s;
        }
        .haibao-tu li .yin2{
            width: 290px;
            height: 386px;
        }

        .xiazai {
            background: url(common.png) 0 -53px no-repeat;
            right: 53px;
            color: white;
        }

        .dingyue {
            background: url(common.png) -53px -53px no-repeat;
            right: 5px;
            color: white;
        }

        .shuzi,
        .scs {
            color: white;
            position: absolute;
            top: 60px;
            left: 20px;
        }

        .xiazai:hover,
        .dingyue:hover {
            width: 53px;
            height: 53px;
            position: absolute;
            top: 0;
        }

        .xiazai:hover {
            background: url(common.png) 0 -109px no-repeat;
            right: 53px;
        }

        .dingyue:hover {
            background: url(common.png) -53px -109px no-repeat;
            right: 5px;
        }

        .footer {
            margin-top: 30px;
            height: 280px;
            display: flex;
            justify-content: space-around;
        }

        .footer-left {
            width: 50%;
            display: flex;
            justify-content: space-between;
        }

        .footer-left p {
            font-size: 15px;
            font-weight: bold;
            color: #666;
        }

        .footer-left ul a {
            text-decoration: none;
            color: #999;
            font-size: 12px;
        }

        .footer-left ul li {
            margin: 8px 0;
        }

        .footer-right {
            width: 30%;
            margin-top: 15px;
            vertical-align: middle;
            position: relative;
        }

        .footer-right a {
            text-decoration: none;
            font-size: 18px;
            color: #666;
            margin-bottom: 30px;
        }

        .call,
        .letter {
            margin-top: 20px;
        }

        .call span:nth-child(1) {
            width: 25px;
            height: 25px;
            background: url(common.png) -65px -176px no-repeat;
            position: absolute;
        }

        .call span:nth-child(2) {
            padding-left: 30px;
            font-size: 18px;
            color: #999;
        }

        .call span:nth-child(3) {
            font-size: 12px;
            color: #999;
        }

        .letter span:nth-child(1) {
            width: 28px;
            height: 27px;
            background: url(common.png) -34px -176px no-repeat;
            position: absolute;
        }

        .letter a {
            padding-left: 30px;
        }

        .qie {
            cursor: pointer;
            width: 120px;
            height: 40px;
            text-align: center;
            background-color: #14DA66;
            color: white;
            font-size: 16px;
            border-radius: 5px;
            padding-top: 10px;
            margin-top: 20px;
        }

        .qie span:nth-child(1) {
            width: 26px;
            height: 26px;
            background: url(common.png) -1px -176px no-repeat;
            display: inline-block;
            vertical-align: middle;
        }

        .last {
            margin-top: 30px;
            display: flex;
            justify-content: space-between;
        }

        .last-left a,
        .last-right a {
            text-decoration: none;
            color: #666;
            font-size: 14px;
        }

        .last-left a {
            display: flex;
        }

        .last-left span,
        .last-list li {
            margin: 0 10px;
        }

        .last-list li:hover {
            color: #14DA66;
        }

        .last-right .lasts {
            color: #999;
            font-size: 14px;
        }

        .sina {
            background: url(common.png) -65px -206px no-repeat;
            display: inline-block;
            width: 26px;
            height: 26px;
        }

        .weixin {
            background: url(common.png) -35px -206px no-repeat;
            display: inline-block;
            width: 26px;
            height: 25px;
        }

        .last-list {
            display: flex;
        }

        .jinghui {
            background: url(common.png) -163px -20px no-repeat;
            display: inline-block;
            width: 23px;
            height: 25px;
            vertical-align: middle;
        }
    </style>
</head>

<body>
    <nav>
        <div class="container">
            <div class="nav-top">
                <ul class="nav-left">
                    <li class="shouye">首页</li>
                    <li>
                        <span>所有分类</span>
                        <span>&#8744;</span>
                    </li>
                    <li>设计创意</li>
                    <li>办公创意</li>
                    <li>&#8901;&nbsp;&#8901;&nbsp;&#8901;</li>
                </ul>
                <ul class="nav-right">
                    <li id="r1">
                        <span id="r5c4"></span>
                        <span id="right1">VIP中心</span>
                    </li>
                    <li id="rignt2">请登录</li>
                    <li id="rignt3">免费注册</li>
                </ul>
            </div>
        </div>
    </nav>
    <div class="container">
        <header>
            <div class="header-left">
                <img src="logo.png" alt="">
            </div>
            <div class="header-right">
                <div class="kuang">
                    <div class="quanzhan">全站&nbsp;&#8744;&nbsp;</div>
                    <input type="text" placeholder=" 800万免费设计素材任意下载">
                    <div class="search-b"><span class="search"></span></div>
                </div>

            </div>
            <div class="header-bottom">
                <span class="black">热门搜索：</span>
                <a href="" class="hot-search">
                <span class="green">七夕</span>
                <span class="black">详情页</span>
                <span class="green">icon</span>
                <span class="black">主图</span>
                <span class="green">秋季</span>
                <span class="green">PPT模板</span>
                <span class="black">EXCEL模板</span>
                <span class="black">首页</span>
                <span class="black">个人简历</span>
                <span class="green">装饰画</span>
                </a>
            </div>
        </header>
    </div>
    <div class="img">
        <div class="container imgs">
            <ul class="img-list">
                <li class="current"><a href="#"><img src="banner01.jpg" alt=""></a></li>
                <li><a href="#"><img src="banner02.jpg" alt=""></a></li>
                <li><a href="#"><img src="banner03.jpg" alt=""></a></li>
                <li><a href="#"><img src="banner04.jpg" alt=""></a></li>
                <li><a href="#"><img src="banner05.jpg" alt=""></a></li>
                <li><a href="#"><img src="banner06.jpg" alt=""></a></li>
                <li><a href="#"><img src="banner07.jpg" alt=""></a></li>
                <li><a href="#"><img src="banner08.jpg" alt=""></a></li>
            </ul>
            <ul class="indicator">
                <a href="#">
                    <li class="active">1</li>
                    <li>2</li>
                    <li>3</li>
                    <li>4</li>
                    <li>5</li>
                    <li>6</li>
                    <li>7</li>
                    <li>8</li>
                </a>
            </ul>
        </div>
        <div class="img-click">
            <span class="prev">&lt;</span>
            <span class="next">&gt;</span>
        </div>
    </div>
    <div class="container">
        <!--精选专区  文字部分-->
        <div class="jxwz">
            <span class="jingtu"></span>
            <span class="zhuanqu">精选专区</span>
            <div class="xiao">
                <a href="#">
                <span>100万党建素材、PPT汇报模板无限下载，每天仅需0.18元立享VIP特权</span>
                </a>
                <a href="#"><span>更多&gt;&gt;</span></a>
            </div>
        </div>
        <!--精选专区  图片部分-->
        <div class="jx-all">
            <ul>
                <li class="jxtu">
                        <img src="jxzt01.jpg" alt="">
                        <div class="yin"></div>
                        <div class="jxzi">
                            <h3>和啤酒有关</h3>
                            <h5>啤酒是如何拯救世界的</h5>
                        </div>

                </li>
                <li class="jxtu">
                        <img src="jxzt02.jpg" alt="">
                        <div class="yin"></div>
                        <div class="jxzi">
                            <h3>爱的元素背景</h3>
                            <h5>七夕到，让爱在土中发芽</h5>
                        </div>
                </li>
                <li class="jxtu">
                        <img src="jxzt03.jpg" alt="">
                        <div class="yin"></div>
                        <div class="jxzi">
                            <h3>鲜花背景精选</h3>
                            <h5>为你的设计锦上添花</h5>
                        </div>
                </li>
                <li class="jxtu">
                        <img src="jxzt04.jpg" alt="">
                        <div class="yin"></div>
                        <div class="jxzi">
                            <h3>枫叶元素背景精选</h3>
                            <h5>一叶而知秋</h5>
                        </div>
                </li>
            </ul>

        </div>
        <!-- 商用海报  文字部分-->
        <div class="jxwz">
            <span class="haibao"></span>
            <span class="zhuanqu">商用海报</span>
            <div class="xiao">
                <a href="#">
                <span>招聘海报</span>
                <span>配图海报</span>
                <span>企业文化</span>
                <span>促销海报</span>
                <span>原创插画</span>
                </a>
                <a href="#"><span>更多&gt;&gt;</span></a>
            </div>
        </div>
        <!--商用海报  图片部分-->
        <div class="haibao-tu">
            <ul>
                <li class="hbtu">
                        <img src="syhb01.jpg" alt="">
                        <div class="yuanchuang"></div>
                        <div class="yin2"></div>
                        <div class="xiazai-all">
                            <div class="xiazai">
                                <span class="shuzi">5</span>
                            </div>
                            <div class="dingyue">
                                <span class="scs">120</span>
                        </div>
                        </div>
                    <a href="#"><span>超清新雪糕夏日凉爽海报</span></a>
                </li>
                <li class="hbtu">
                        <img src="syhb02.jpg" alt="">
                    <div class="yuanchuang"></div>
                    <div class="yin2"></div>
                    <div class="xiazai-all">
                        <div class="xiazai"><span class="shuzi">251</span></div>
                        <div class="dingyue"><span class="scs">297</span></div>
                    </div>
                    <a href="#"><span>文艺夏日时光菠萝蓝色简约海报设计微信配图</span></a>
                </li>
                <li class="hbtu">
                    <img src="syhb03.jpg" alt="">
                    <div class="yuanchuang"></div>
                    <div class="yin2"></div>
                    <div class="xiazai-all">
                        <div class="xiazai"><span class="shuzi">32</span></div>
                        <div class="dingyue"><span class="scs">64</span></div>
                    </div>
                    <a href="#"><span>七夕情人节扁平风创意简约商业海报设计模板</span></a>
                </li>
                <li class="hbtu">
                    <img src="syhb04.jpg" alt="">
                    <div class="yuanchuang"></div>
                    <div class="yin2"></div>
                    <div class="xiazai-all">
                        <div class="xiazai"><span class="shuzi">221</span></div>
                        <div class="dingyue"><span class="scs">174</span></div>
                    </div>
                    <a href="#"><span>我的前半生文艺情感配图海报设计</span></a>
                </li>
            </ul>
        </div>
    </div>
    <footer>
        <div class="container">
            <div class="footer">
                <div class="footer-left">
                    <ul>
                        <p>常见问题</p>
                        <a href="#">
                            <li>成为特邀设计师</li>
                            <li>成为原创工作者</li>
                            <li>注册/登录</li>
                            <li>账号/密码</li>
                            <li>充值/售后</li>
                            <li>版权投诉</li>
                        </a>
                    </ul>
                    <ul>
                        <p>关于千图网</p>
                        <a href="#">
                            <li>关于我们</li>
                            <li>媒体报道</li>
                            <li>加入我们</li>
                            <li>心系千图</li>
                            <li>每日最新</li>
                        </a>
                    </ul>
                    <ul>
                        <p>产品服务</p>
                        <a href="#">
                            <li>官方博客</li>
                            <li>帮助中心</li>
                            <li>千图导航</li>
                        </a>
                    </ul>
                    <ul>
                        <p>友情链接</p>
                        <a href="#">
                            <li>我图网</li>
                            <li>千库网</li>
                            <li>摄图网</li>
                            <li>包图网</li>
                            <li>视达网</li>
                            <li>更多&gt;&gt;</li>
                        </a>
                    </ul>
                </div>
                <div class="footer-right">
                    <a href="#">客服咨询</a>
                    <div class="call">
                        <span></span>
                        <span>400-998-7011</span>
                        <span>(9:00-18:00)</span>
                    </div>
                    <div class="letter">
                        <span></span>
                        <a href="#">feedback@58pic.com</a>
                    </div>
                    <div class="qie">
                        <span></span>
                        <span>点我交谈</span>
                    </div>
                </div>
            </div>
            <hr>
            <div class="last">
                <div class="last-left">
                    <a href="#">
            <span class="sina"></span>
            <span class="weixin"></span>
            <ul class="last-list">
                <li>注册声明</li>
                <li>版权声明</li>
                <li>售后服务</li>
            </ul>
        </a>
                </div>
                <div class="last-right">
                    <span class="lasts">Copyright ©2013-2017 千图网</span>
                    <a href="#">
                <span>沪ICP备10011451号-6</span>
                <span class="jinghui"></span>
            </a>
                    <span class="lasts">上海工商 安全实名验证 信用网站</span>
                </div>
            </div>
        </div>
    </footer>
</body>

</html>
<script>
    var imgLis = document.querySelectorAll('.img-list li');
    var indicatorsLis = document.querySelectorAll('.indicator li');
    var prev = document.querySelector('.prev');
    var next = document.querySelector('.next');
    var box = document.querySelector('.img');

    var bgColorArr = ['#060606', '#feff0f', '#fdf100', '#2E9CFE', '#89dce3', '#fef8b3', '#110204', '#f4cad8']


    var timer = setInterval(nextImg, 1000);
    var index = 0;
    function prevImg() {
        index = index == 0 ? imgLis.length - 1 : index - 1;
        showImg();
    }
    function nextImg() {
        index = index == imgLis.length - 1 ? 0 : index + 1;
        showImg();
    }

    function showImg() {
        for (var i = 0; i < imgLis.length; i++) {
            imgLis[i].className = '';
            indicatorsLis[i].className = '';
        }
        imgLis[this.index].className = 'current';
        indicatorsLis[this.index].className = 'active';
        box.style.backgroundColor = bgColorArr[this.index];
    }
    for (var i = 0; i < indicatorsLis.length; i++) {
        indicatorsLis[i].index = i;
        indicatorsLis[i].onclick = function () {
            clearInterval(timer);
            timer = null;
            // 根据鼠标选中的指示灯的索引值来切换图片
            // 并记录和更新index的值
            index = this.index;
            showImg();
        }
    }
    prev.onclick = function () {
        prevImg();
    }
    next.onclick = function () {
        nextImg();
    }
    box.onmouseenter = function () {
        clearInterval(timer);
        timer = null;
        prev.style.display = 'block';
        next.style.display = 'block';
    }
    box.onmouseleave = function () {
        if (timer != null) {
            return;
        }
        timer = setInterval(nextImg, 1000);
        prev.style.display = 'none';
        next.style.display = 'none';
    }

    // 精选专区
    // var yins = document.querySelectorAll('.jx-all .yin');
    // var wenzis = document.querySelectorAll('.jx-all .jxzi');
    // var lis = document.querySelectorAll('.jx-all li');

    // for(var i = 0;i<lis.length;i++){
    //     lis[i].index = i;
    //     lis[i].onmouseenter = function(){
    //         yins[this.index].style.display = 'block';
    //         wenzis[this.index].style.display = 'block';
    //     }
    //     lis[i].onmouseleave = function(){
    //         yins[this.index].style.display = 'none';
    //         wenzis[this.index].style.display = 'none';
    //     }
    // }


    //商务海报
    //  var yin2s = document.querySelectorAll('.haibao-tu .yin2');
    //  var xiazais = document.querySelectorAll('.haibao-tu .xiazai-all');
    //  var hbLis = document.querySelectorAll('.haibao-tu li');

    //   for(var i = 0;i<hbLis.length;i++){
    //     hbLis[i].index = i;
    //     hbLis[i].onmouseenter = function(){
    //         yin2s[this.index].style.display = 'block';
    //         xiazais[this.index].style.display = 'block';
    //     }
    //     hbLis[i].onmouseleave = function(){
    //         yin2s[this.index].style.display = 'none';
    //         xiazais[this.index].style.display = 'none';
    //     }
    // }

</script>